package com.thb.pay.api.merchant;


import com.thb.pay.api.merchant.fallback.MchAgentpayRecordServiceApiFallbackFactory;
import com.thb.pay.api.merchant.vo.req.MchAgentpayRecordPageReq;
import com.thb.pay.api.merchant.vo.req.MchAgentpayRecordReq;
import com.thb.pay.api.merchant.vo.resp.MchAgentpayRecordVo;
import com.thb.pay.core.utils.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "pay-service", fallbackFactory = MchAgentpayRecordServiceApiFallbackFactory.class)
@RequestMapping("/mchAgentpayRecordServiceApi")
public interface MchAgentpayRecordServiceApi {

    @RequestMapping(value = "/findPage", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    PageResult<MchAgentpayRecordVo> findPage(@RequestBody MchAgentpayRecordPageReq pageReq);

    @RequestMapping(value = "/getById", method = RequestMethod.GET)
    MchAgentpayRecordVo getById(@RequestParam("id") Long id);

    @RequestMapping(value = "/add", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void add(@RequestBody MchAgentpayRecordReq mchAgentpayRecordReq);

    @RequestMapping(value = "/update", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void update(@RequestBody MchAgentpayRecordReq mchAgentpayRecordReq);

    @RequestMapping(value = "/deleteBatchIds", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void deleteBatchIds(List<Long> ids);
}
